package backend.majiong.yaku;

import java.util.ArrayList;
import java.util.List;

import backend.MainGame;
import backend.majiong.Combo;
import backend.majiong.Player;
import backend.majiong.yaku.yaku.Cyankan;
import backend.majiong.yaku.yaku.Cyanta;
import backend.majiong.yaku.yaku.DoraYaku;
import backend.majiong.yaku.yaku.Haitei;
import backend.majiong.yaku.yaku.Honitu;
import backend.majiong.yaku.yaku.Honroutou;
import backend.majiong.yaku.yaku.Houtei;
import backend.majiong.yaku.yaku.Ikkituukan;
import backend.majiong.yaku.yaku.Ipeikou;
import backend.majiong.yaku.yaku.Ippatu;
import backend.majiong.yaku.yaku.JunCyan;
import backend.majiong.yaku.yaku.PinFu;
import backend.majiong.yaku.yaku.Reach;
import backend.majiong.yaku.yaku.Rinsyan;
import backend.majiong.yaku.yaku.Ryanpeikou;
import backend.majiong.yaku.yaku.Sanankou;
import backend.majiong.yaku.yaku.Sankantu;
import backend.majiong.yaku.yaku.SansyokuDoujun;
import backend.majiong.yaku.yaku.SansyokuDoukou;
import backend.majiong.yaku.yaku.Syousangen;
import backend.majiong.yaku.yaku.Tanyao;
import backend.majiong.yaku.yaku.Tinitu;
import backend.majiong.yaku.yaku.Toitoi;
import backend.majiong.yaku.yaku.Tumo;
import backend.majiong.yaku.yaku.WReach;
import backend.majiong.yaku.yaku.YakuHai;
import backend.majiong.yaku.yakuman.Chinroutou;
import backend.majiong.yaku.yakuman.Cyuurennpoutou;
import backend.majiong.yaku.yakuman.Daisangen;
import backend.majiong.yaku.yakuman.Daisuushi;
import backend.majiong.yaku.yakuman.Kokushi;
import backend.majiong.yaku.yakuman.Ryuuisou;
import backend.majiong.yaku.yakuman.Suuankou;
import backend.majiong.yaku.yakuman.Suukantu;
import backend.majiong.yaku.yakuman.Syousuushi;
import backend.majiong.yaku.yakuman.Tenhou;
import backend.majiong.yaku.yakuman.Tihou;
import backend.majiong.yaku.yakuman.Tuuisou;


public class YakuCheck {

    private static List<AbstractYaku> yakuManList = new ArrayList<AbstractYaku>();

    private static List<AbstractYaku> yakuList = new ArrayList<AbstractYaku>();
    
    static {
        yakuList.add(new Cyankan());
        yakuList.add(new Cyanta());
        yakuList.add(new DoraYaku());
        yakuList.add(new Haitei());
        yakuList.add(new Honitu());
        yakuList.add(new Honroutou());
        yakuList.add(new Houtei());
        yakuList.add(new Ikkituukan());
        yakuList.add(new Ipeikou());
        yakuList.add(new Ippatu());
        yakuList.add(new JunCyan());
        yakuList.add(new PinFu());
        yakuList.add(new Reach());
        yakuList.add(new Rinsyan());
        yakuList.add(new Ryanpeikou());
        yakuList.add(new Sanankou());
        yakuList.add(new Sankantu());
        yakuList.add(new SansyokuDoujun());
        yakuList.add(new SansyokuDoukou());
        yakuList.add(new Syousangen());
        yakuList.add(new Tanyao());
        yakuList.add(new Tinitu());
        yakuList.add(new Toitoi());
        yakuList.add(new Tumo());
        yakuList.add(new WReach());
        yakuList.add(new YakuHai());
        
        yakuManList.add(new Chinroutou());
        yakuManList.add(new Cyuurennpoutou());
        yakuManList.add(new Daisangen());
        yakuManList.add(new Daisuushi());
        yakuManList.add(new Kokushi());
        yakuManList.add(new Ryuuisou());
        yakuManList.add(new Suuankou());
        yakuManList.add(new Suukantu());
        yakuManList.add(new Syousuushi());
        yakuManList.add(new Tenhou());
        yakuManList.add(new Tihou());
        yakuManList.add(new Tuuisou());
    }
    
    public static void checkYaku(){
        Player player = new Player();
        Combo cb = new Combo();
        MainGame mainGame = new MainGame();
        HandCombo combo = HandCombo.buildHandCombo(player, cb, mainGame );
        for(AbstractYaku yaku:yakuManList) {
            yaku.checkYaku(null, combo, null);
        }
    }
    
}
